USE dryad;

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structureupdated_time for t_sys_dept
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_dept`;
CREATE TABLE `t_sys_dept` (
  `dept_id` bigint(20) unsigned  NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL,
  `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
  `created_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `updated_time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `del_flag` char(1) DEFAULT '0',
  `parent_id` bigint(20) unsigned DEFAULT NULL,
  `reversion`            bigint(20) unsigned default 0,
  `rsv1`                 varchar(128),
  PRIMARY KEY (`dept_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='部门管理';

-- ----------------------------'2020
-- Records of sys_dept'2020
-- ----------------------------
BEGIN;
INSERT INTO `t_sys_dept` VALUES (1, '城镇中心', 1, '2020-01-22 19:00:23', '2020-05-18 14:56:06', '0', 0,0,null);
INSERT INTO `t_sys_dept` VALUES (2, '国王祭坛', 2, '2020-01-22 19:00:38', '2020-05-18 14:12:07', '0', 0,0,null);
INSERT INTO `t_sys_dept` VALUES (3, '兵营', 3, '2020-01-22 19:00:44', '2020-05-18 14:56:11', '0', 1,0,null);
INSERT INTO `t_sys_dept` VALUES (4, '伐木场', 4, '2020-01-22 19:00:52', '2020-05-18 14:56:09', '0', 3,0,null);
INSERT INTO `t_sys_dept` VALUES (5, '铁匠铺', 5, '2020-01-22 19:00:57', '2020-05-18 14:56:13', '0', 4,0,null);
INSERT INTO `t_sys_dept` VALUES (6, '神秘圣地', 6, '2020-01-22 19:01:06', '2020-05-18 14:56:16', '1', 5,0,null);
INSERT INTO `t_sys_dept` VALUES (7, '狮鹫笼', 7, '2020-01-22 19:01:57', '2020-05-18 14:12:17', '0', 2,0,null);
INSERT INTO `t_sys_dept` VALUES (8, '车间', 8, '2020-01-22 19:02:03', '2020-05-18 14:12:19', '0', 7,0,null);
COMMIT;

-- ----------------------------
-- Table structure for t_sys_dept_relation
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_dept_relation`;
CREATE TABLE `t_sys_dept_relation` (
  `ancestor` bigint(20) unsigned NOT NULL COMMENT '祖先节点',
  `descendant` bigint(20) unsigned NOT NULL COMMENT '后代节点',
  `reversion`            bigint(20) unsigned default 0,
  `rsv1`                 varchar(128),
  PRIMARY KEY (`ancestor`,`descendant`) USING BTREE,
  KEY `idx_dept_rel_ancestor` (`ancestor`) USING BTREE,
  KEY `idx_dept_rel_descendant` (`descendant`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='部门关系表';

-- ----------------------------
-- Records of sys_dept_relation
-- ----------------------------
BEGIN;
INSERT INTO `t_sys_dept_relation` VALUES (1, 1,0,null);
INSERT INTO `t_sys_dept_relation` VALUES (1, 3,0,null);
INSERT INTO `t_sys_dept_relation` VALUES (1, 4,0,null);
INSERT INTO `t_sys_dept_relation` VALUES (1, 5,0,null);
INSERT INTO `t_sys_dept_relation` VALUES (2, 2,0,null);
INSERT INTO `t_sys_dept_relation` VALUES (2, 7,0,null);
INSERT INTO `t_sys_dept_relation` VALUES (2, 8,0,null);
INSERT INTO `t_sys_dept_relation` VALUES (2, 11,0,null);
INSERT INTO `t_sys_dept_relation` VALUES (2, 12,0,null);
INSERT INTO `t_sys_dept_relation` VALUES (3, 3,0,null);
INSERT INTO `t_sys_dept_relation` VALUES (3, 4,0,null);
INSERT INTO `t_sys_dept_relation` VALUES (3, 5,0,null);
INSERT INTO `t_sys_dept_relation` VALUES (4, 4,0,null);
INSERT INTO `t_sys_dept_relation` VALUES (4, 5,0,null);
INSERT INTO `t_sys_dept_relation` VALUES (5, 5,0,null);
INSERT INTO `t_sys_dept_relation` VALUES (7, 7,0,null);
INSERT INTO `t_sys_dept_relation` VALUES (7, 8,0,null);
INSERT INTO `t_sys_dept_relation` VALUES (7, 11,0,null);
INSERT INTO `t_sys_dept_relation` VALUES (7, 12,0,null);
INSERT INTO `t_sys_dept_relation` VALUES (8, 8,0,null);
COMMIT;



-- ----------------------------
-- Table structure for t_sys_file
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_file`;
CREATE TABLE `t_sys_file` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
  `file_name` varchar(100) DEFAULT NULL,
  `bucket_name` varchar(200) DEFAULT NULL,
  `original` varchar(100) DEFAULT NULL,
  `type` varchar(50) DEFAULT NULL,
  `file_size` bigint(50) DEFAULT NULL COMMENT '文件大小',
  `created_by` varchar(64) DEFAULT NULL,
  `created_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
  `updated_by` varchar(64) DEFAULT NULL,
  `updated_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `del_flag` char(1) DEFAULT '0',
  `reversion`            bigint(20) unsigned default 0,
  `rsv1`                 varchar(128),
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='文件管理表';



-- ----------------------------
-- Table structure for t_sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_menu`;
CREATE TABLE `t_sys_menu` (
  `menu_id` bigint(20)  NOT NULL AUTO_INCREMENT COMMENT '菜单ID',
  `name` varchar(32) DEFAULT NULL,
  `permission` varchar(32) DEFAULT NULL,
  `path` varchar(128) DEFAULT NULL,
  `parent_id` bigint(20)  DEFAULT NULL COMMENT '父菜单ID',
  `icon` varchar(32) DEFAULT NULL,
  `sort` int(11) DEFAULT '1' COMMENT '排序值',
  `keep_alive` char(1) DEFAULT '0',
  `type` char(1) DEFAULT '0',
  `created_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `updated_time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `del_flag` char(1) DEFAULT '0',
  `reversion`            bigint(20) unsigned default 0,
  `rsv1`                 varchar(128),
  PRIMARY KEY (`menu_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10013 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='菜单权限表';

-- ----------------------------
-- Records of sys_menu
-- ----------------------------
BEGIN;
INSERT INTO `t_sys_menu` VALUES (1000, '权限管理', NULL, '/user', -1, 'icon-quanxianguanli', 0, '0', '0', '2019-09-28 08:29:53', '2020-03-24 08:56:32', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (1100, '用户管理', NULL, '/admin/user/index', 1000, 'icon-yonghuguanli', 1, '0', '0', '2020-11-02 22:24:37', '2020-03-24 08:56:33', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (1101, '用户新增', 't_sys_user_add', NULL, 1100, NULL, NULL, '0', '1', '2019-11-08 09:52:09', '2020-03-24 08:56:34', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (1102, '用户修改', 't_sys_user_edit', NULL, 1100, NULL, NULL, '0', '1', '2019-11-08 09:52:48', '2020-03-24 08:56:35', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (1103, '用户删除', 't_sys_user_del', NULL, 1100, NULL, NULL, '0', '1', '2019-11-08 09:54:01', '2020-03-24 08:56:37', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (1200, '菜单管理', NULL, '/admin/menu/index', 1000, 'icon-caidanguanli', 2, '0', '0', '2019-11-08 09:57:27', '2020-03-24 08:56:38', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (1201, '菜单新增', 'sys_menu_add', NULL, 1200, NULL, NULL, '0', '1', '2019-11-08 10:15:53', '2020-03-24 08:56:39', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (1202, '菜单修改', 'sys_menu_edit', NULL, 1200, NULL, NULL, '0', '1', '2019-11-08 10:16:23', '2020-03-24 08:56:40', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (1203, '菜单删除', 'sys_menu_del', NULL, 1200, NULL, NULL, '0', '1', '2019-11-08 10:16:43', '2020-03-24 08:56:41', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (1300, '角色管理', NULL, '/admin/role/index', 1000, 'icon-jiaoseguanli', 3, '0', '0', '2019-11-08 10:13:37', '2020-03-24 08:56:42', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (1301, '角色新增', 'sys_role_add', NULL, 1300, NULL, NULL, '0', '1', '2019-11-08 10:14:18', '2020-03-24 08:56:43', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (1302, '角色修改', 'sys_role_edit', NULL, 1300, NULL, NULL, '0', '1', '2019-11-08 10:14:41', '2020-03-24 08:56:43', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (1303, '角色删除', 'sys_role_del', NULL, 1300, NULL, NULL, '0', '1', '2019-11-08 10:14:59', '2020-03-24 08:56:45', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (1304, '分配权限', 'sys_role_perm', NULL, 1300, NULL, NULL, '0', '1', '2020-01-20 07:22:55', '2020-03-24 08:56:46', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (1400, '部门管理', NULL, '/admin/dept/index', 1000, 'icon-web-icon-', 4, '0', '0', '2020-01-20 13:17:19', '2020-03-24 08:56:47', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (1401, '部门新增', 'sys_dept_add', NULL, 1400, NULL, NULL, '0', '1', '2020-01-20 14:56:16', '2020-03-24 08:56:48', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (1402, '部门修改', 'sys_dept_edit', NULL, 1400, NULL, NULL, '0', '1', '2020-01-20 14:56:59', '2020-03-24 08:56:48', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (1403, '部门删除', 'sys_dept_del', NULL, 1400, NULL, NULL, '0', '1', '2020-01-20 14:57:28', '2020-03-24 08:56:51', '0',0,null);

INSERT INTO `t_sys_menu` VALUES (2000, '系统管理', NULL, '/admin', -1, 'icon-xitongguanli', 1, '0', '0', '2019-11-07 20:56:00', '2020-03-24 08:56:55', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (2100, '日志管理', NULL, '/admin/log/index', 2000, 'icon-rizhiguanli', 5, '0', '0', '2019-11-20 14:06:22', '2020-03-24 08:56:56', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (2101, '日志删除', 'sys_log_del', NULL, 2100, NULL, NULL, '0', '1', '2019-11-20 20:37:37', '2020-03-24 08:56:58', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (2200, '字典管理', NULL, '/admin/dict/index', 2000, 'icon-navicon-zdgl', 6, '0', '0', '2019-11-29 11:30:52', '2020-03-24 08:56:58', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (2201, '字典删除', 'sys_dict_del', NULL, 2200, NULL, NULL, '0', '1', '2019-11-29 11:30:11', '2020-03-24 08:56:59', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (2202, '字典新增', 'sys_dict_add', NULL, 2200, NULL, NULL, '0', '1', '2020-01-11 22:34:55', '2020-03-24 08:57:01', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (2203, '字典修改', 'sys_dict_edit', NULL, 2200, NULL, NULL, '0', '1', '2020-01-11 22:36:03', '2020-03-24 08:57:09', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (2210, '参数管理', NULL, '/admin/param/index', 2000, 'icon-canshu', 7, '1', '0', '2020-02-29 22:16:50', '2020-03-24 08:57:10', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (2211, '参数新增', 'admin_syspublicparam_add', NULL, 2210, NULL, 1, '0', '1', '2020-02-29 22:17:36', '2020-03-24 08:57:11', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (2212, '参数删除', 'admin_syspublicparam_del', NULL, 2210, NULL, 1, '0', '1', '2020-02-29 22:17:55', '2020-03-24 08:57:12', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (2213, '参数编辑', 'admin_syspublicparam_edit', NULL, 2210, NULL, 1, '0', '1', '2020-02-29 22:18:14', '2020-03-24 08:57:13', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (2300, '代码生成', '', '/gen/index', 10006, 'icon-weibiaoti46', 1, '0', '0', '2020-01-20 13:17:19', '2020-03-24 08:57:14', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (2400, '终端管理', '', '/admin/client/index', 2000, 'icon-bangzhushouji', 9, '1', '0', '2020-01-20 13:17:19', '2020-03-24 08:57:15', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (2401, '客户端新增', 'sys_client_add', NULL, 2400, '1', NULL, '0', '1', '2020-02-15 21:35:18', '2020-03-24 08:57:16', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (2402, '客户端修改', 'sys_client_edit', NULL, 2400, NULL, NULL, '0', '1', '2020-02-15 21:37:06', '2020-03-24 08:57:16', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (2403, '客户端删除', 'sys_client_del', NULL, 2400, NULL, NULL, '0', '1', '2020-02-15 21:39:16', '2020-03-24 08:57:17', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (2500, '密钥管理', '', '/admin/social/index', 2000, 'icon-miyue', 10, '0', '0', '2020-01-20 13:17:19', '2020-03-24 08:57:18', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (2501, '密钥新增', 'sys_social_details_add', NULL, 2500, '1', 0, '0', '1', '2020-02-15 21:35:18', '2020-03-24 08:57:19', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (2502, '密钥修改', 'sys_social_details_edit', NULL, 2500, '1', 1, '0', '1', '2020-02-15 21:35:18', '2020-03-24 08:57:19', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (2503, '密钥删除', 'sys_social_details_del', NULL, 2500, '1', 2, '0', '1', '2020-02-15 21:35:18', '2020-03-24 08:57:23', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (2600, '令牌管理', NULL, '/admin/token/index', 2000, 'icon-denglvlingpai', 11, '0', '0', '2020-02-04 05:58:41', '2020-03-24 08:57:24', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (2601, '令牌删除', 'sys_token_del', NULL, 2600, NULL, 1, '0', '1', '2020-02-04 05:59:50', '2020-03-24 08:57:24', '0',0,null);

INSERT INTO `t_sys_menu` VALUES (3000, '系统监控', NULL, '/daemon', -1, 'icon-msnui-supervise', 2, '0', '0', '2020-02-27 01:13:21', '2020-03-24 08:57:31', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (3100, '服务监控', NULL, 'http://127.0.0.1:5001', 3000, 'icon-server', 0, '0', '0', '2020-02-26 10:50:32', '2020-03-24 08:57:32', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (3110, '缓存监控', NULL, '/monitor/redis/index', 3000, 'icon-qingchuhuancun', 1, '1', '0', '2020-02-08 23:51:27', '2020-03-24 08:57:33', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (3200, '接口文档', NULL, 'http://127.0.0.1:9999/swagger-ui.html', 3000, 'icon-wendang', 1, '0', '0', '2020-06-26 10:50:32', '2020-03-24 08:57:34', '0',0,null);

INSERT INTO `t_sys_menu` VALUES (3500, '文档扩展', NULL, 'http://127.0.0.1:9999/doc.html', 3000, 'icon-wendang', 2, '0', '0', '2020-02-26 10:50:32', '2020-03-24 08:57:36', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (4000, '协同管理', NULL, '/activti', -1, 'icon-kuaisugongzuoliu_o', 3, '0', '0', '2020-02-26 01:38:13', '2020-03-24 08:57:39', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (4100, '模型管理', NULL, '/activiti/index', 4000, 'icon-weibiaoti13', 1, '0', '0', '2020-02-26 01:39:07', '2020-03-24 08:57:40', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (4101, '模型管理', 'act_model_manage', NULL, 4100, '1', 0, '0', '1', '2020-02-15 21:35:18', '2020-03-24 08:57:41', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (4200, '流程管理', '/activiti/process', '/activiti/process', 4000, 'icon-liucheng', 2, '0', '0', '2020-09-26 06:41:05', '2020-03-24 08:57:42', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (4201, '流程管理', 'act_process_manage', NULL, 4200, '1', 0, '0', '1', '2020-02-15 21:35:18', '2020-03-24 08:57:42', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (4300, '请假管理', '/activiti/leave', '/activiti/leave', 4000, 'icon-qingjia', 3, '0', '0', '2020-01-20 13:17:19', '2020-03-24 08:57:43', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (4301, '请假新增', 'act_leavebill_add', NULL, 4300, '1', 0, '0', '1', '2020-02-15 21:35:18', '2020-03-24 08:57:44', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (4302, '请假修改', 'act_leavebill_edit', NULL, 4300, '1', 1, '0', '1', '2020-02-15 21:35:18', '2020-03-24 08:57:45', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (4303, '请假删除', 'act_leavebill_del', NULL, 4300, '1', 2, '0', '1', '2020-02-15 21:35:18', '2020-03-24 08:57:46', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (4400, '待办任务', '/activiti/task', '/activiti/task', 4000, 'icon-renwu', 4, '0', '0', '2020-09-27 09:52:31', '2020-03-24 08:57:48', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (4401, '流程管理', 'act_task_manage', NULL, 4400, '1', 0, '0', '1', '2020-02-15 21:35:18', '2020-03-24 08:57:50', '0',0,null);

INSERT INTO `t_sys_menu` VALUES (10000, '文件管理', NULL, '/admin/file/index', 2000, 'icon-wenjianguanli', 6, '0', '0', '2020-06-25 12:44:46', '2020-03-24 08:58:41', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (10001, '删除文件', 'sys_file_del', NULL, 10000, NULL, 1, '0', '1', '2020-02-25 13:41:41', '2020-03-24 08:58:42', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (10002, '表单管理', '', '/gen/form', 10006, 'icon-record', 3, '0', '0', '2020-02-20 13:17:19', '2020-03-24 08:58:44', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (10003, '表单新增', 'gen_form_add', NULL, 10002, '1', 0, '0', '1', '2020-02-15 21:35:18', '2020-03-24 08:58:45', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (10004, '表单修改', 'gen_form_edit', NULL, 10002, '1', 1, '0', '1', '2020-02-15 21:35:18', '2020-03-24 08:58:46', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (10005, '表单删除', 'gen_form_del', NULL, 10002, '1', 2, '0', '1', '2020-02-15 21:35:18', '2020-03-24 08:58:47', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (10006, '开发平台', NULL, '/gen', -1, 'icon-shejiyukaifa-', 9, '0', '0', '2020-02-12 09:35:16', '2020-03-24 08:58:48', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (10007, '数据源管理', NULL, '/gen/datasource', 10006, 'icon-mysql', 0, '0', '0', '2020-02-12 09:42:11', '2020-03-24 08:58:49', '0',0,null);
INSERT INTO `t_sys_menu` VALUES (10008, '表单设计', NULL, '/gen/design', 10006, 'icon-biaodanbiaoqian', 2, '0', '0', '2020-02-16 10:08:56', '2020-03-24 08:58:53', '0',0,null);
COMMIT;



-- ----------------------------
-- Table structure for t_sys_public_param
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_public_param`;
CREATE TABLE `t_sys_public_param` (
  `public_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
  `public_name` varchar(128) DEFAULT NULL,
  `public_key` varchar(128) DEFAULT NULL,
  `public_value` varchar(128) DEFAULT NULL,
  `status` char(1) DEFAULT '0',
  `validate_code` varchar(64) DEFAULT NULL,
  `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `updated_time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `public_type` char(1) DEFAULT '0',
  `system` char(1) DEFAULT '0',
  `del_flag` char(1) DEFAULT '0',
  `reversion`            bigint(20) unsigned default 0,
  `rsv1`                 varchar(128),
  PRIMARY KEY (`public_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='公共参数配置表';

-- ----------------------------
-- Records of t_sys_public_param
-- ----------------------------,0,null);
BEGIN;
INSERT INTO `t_sys_public_param` VALUES (1, '租户默认来源', 'TENANT_DEFAULT_ID', '1', '0', '', '2020-05-12 04:03:46', '2020-06-20 08:56:30', '2', '0', '1',0,null);
INSERT INTO `t_sys_public_param` VALUES (2, '租户默认部门名称', 'TENANT_DEFAULT_DEPTNAME', '租户默认部门', '0', '', '2020-05-12 03:36:32', NULL, '2', '1', '0',0,null);
INSERT INTO `t_sys_public_param` VALUES (3, '租户默认账户', 'TENANT_DEFAULT_USERNAME', 'admin', '0', '', '2020-05-12 04:05:04', NULL, '2', '1', '0',0,null);
INSERT INTO `t_sys_public_param` VALUES (4, '租户默认密码', 'TENANT_DEFAULT_PASSWORD', '123456', '0', '', '2020-05-12 04:05:24', NULL, '2', '1', '0',0,null);
INSERT INTO `t_sys_public_param` VALUES (5, '租户默认角色编码', 'TENANT_DEFAULT_ROLECODE', 'ROLE_ADMIN', '0', '', '2020-05-12 04:05:57', NULL, '2', '1', '0',0,null);
INSERT INTO `t_sys_public_param` VALUES (6, '租户默认角色名称', 'TENANT_DEFAULT_ROLENAME', '租户默认角色', '0', '', '2020-05-12 04:06:19', NULL, '2', '1', '0',0,null);
INSERT INTO `t_sys_public_param` VALUES (7, '表前缀', 'GEN_TABLE_PREFIX', 'tb_', '0', '', '2020-05-12 04:23:04', NULL, '9', '1', '0',0,null);
INSERT INTO `t_sys_public_param` VALUES (8, '接口文档不显示的字段', 'GEN_HIDDEN_COLUMNS', 'tenant_id', '0', '', '2020-05-12 04:25:19', NULL, '9', '1', '0',0,null);
COMMIT;

-- ----------------------------
-- Table structure for t_sys_role
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_role`;
CREATE TABLE `t_sys_role` (
  `role_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `role_name` varchar(64) DEFAULT NULL,
  `role_code` varchar(64) DEFAULT NULL,
  `role_desc` varchar(255) DEFAULT NULL,
  `ds_type` char(1) DEFAULT '2',
  `ds_scope` varchar(255) DEFAULT NULL,
  `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `del_flag` char(1) DEFAULT '0',
  `reversion`            bigint(20) unsigned default 0,
  `rsv1`                 varchar(128),
  PRIMARY KEY (`role_id`) USING BTREE,
  KEY `idx_sys_role_code` (`role_code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='系统角色表';

-- ----------------------------
-- Records of sys_role
-- ----------------------------
BEGIN;
INSERT INTO `t_sys_role` VALUES (1, '管理员', 'ROLE_ADMIN', '管理员', '0', '2', '2019-10-29 15:45:51', '2020-12-26 14:09:11', '0',0,null);
COMMIT;

-- ----------------------------
-- Table structure for t_sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_role_menu`;
CREATE TABLE `t_sys_role_menu` (
  `role_id` bigint(20) unsigned NOT NULL COMMENT '角色ID',
  `menu_id` bigint(20) unsigned NOT NULL COMMENT '菜单ID',
  `reversion`            bigint(20) unsigned default 0,
  `rsv1`                 varchar(128),
  PRIMARY KEY (`role_id`,`menu_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='角色菜单表';

-- ----------------------------
-- Records of t_sys_role_menu
-- ----------------------------
BEGIN;
INSERT INTO `t_sys_role_menu` VALUES (1, 1000,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 1100,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 1101,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 1102,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 1103,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 1200,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 1201,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 1202,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 1203,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 1300,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 1301,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 1302,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 1303,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 1304,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 1400,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 1401,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 1402,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 1403,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 1500,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 1501,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 1502,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 1503,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2000,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2100,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2101,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2200,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2201,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2202,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2203,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2210,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2211,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2212,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2213,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2300,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2400,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2401,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2402,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2403,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2500,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2501,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2502,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2503,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2600,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2601,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2700,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2800,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2810,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2820,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2830,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2840,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2850,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2860,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 2870,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 3000,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 3100,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 3110,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 3200,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 3300,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 3400,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 3500,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 3600,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 4000,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 4100,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 4101,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 4200,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 4201,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 4300,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 4301,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 4302,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 4303,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 4400,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 4401,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 5000,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 5100,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 5110,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 5120,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 5130,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 5200,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 5300,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 5310,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 5320,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 5330,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 5400,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 5410,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 5420,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 5430,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 5500,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 5510,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 5520,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 5530,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6000,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6100,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6101,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6102,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6103,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6200,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6201,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6202,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6203,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6300,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6301,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6302,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6303,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6304,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6305,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6400,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6401,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6402,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6500,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6600,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6601,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6602,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6700,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6701,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6702,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 6703,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 10000,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 10001,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 10002,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 10003,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 10004,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 10005,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 10006,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 10007,0,null);
INSERT INTO `t_sys_role_menu` VALUES (1, 10008,0,null);
COMMIT;





-- ----------------------------
-- Table structure for t_sys_user
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_user`;
CREATE TABLE `t_sys_user` (
  `user_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `username` varchar(64) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `salt` varchar(255) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `avatar` mediumblob,
  `dept_id` bigint(20) unsigned DEFAULT NULL COMMENT '部门ID',
  `created_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `updated_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `lock_flag` char(1) DEFAULT '0',
  `del_flag` char(1) DEFAULT '0',
  `wx_openid` varchar(32) DEFAULT NULL COMMENT '微信登录openId',
  `mini_openid` varchar(32) DEFAULT NULL COMMENT '小程序openId',
  `qq_openid` varchar(32) DEFAULT NULL COMMENT 'QQ openId',
  `reversion` bigint(20) unsigned DEFAULT '0',
  `rsv1` varchar(128) DEFAULT NULL,
  `totp` varchar(32) DEFAULT NULL,
  `token` varchar(64) DEFAULT NULL,
  `token_expire_time` datetime DEFAULT NULL,
  PRIMARY KEY (`user_id`) USING BTREE,
  KEY `idx_user_wx_openid` (`wx_openid`) USING BTREE,
  KEY `idx_user_qq_openid` (`qq_openid`) USING BTREE,
  KEY `idx_user_username` (`username`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='用户表';

-- ----------------------------
-- Records of t_sys_user
-- ----------------------------
BEGIN;
INSERT INTO `t_sys_user` (`user_id`,`username`,`password`,`salt`,`phone`,`avatar`,`dept_id`,`created_time`,`updated_time`,`lock_flag`,`del_flag`,`wx_openid`,`mini_openid`,`qq_openid`,`reversion`,`rsv1`,`totp`,`token`,`token_expire_time`)
VALUES (1,'admin','$2a$10$IVzj1Wd.ZQdOIWdb1htQjexU94uoNeuk1crlQ9ExVupPi0Iy1uv.C','','17034642888','',1,'2020-04-20 07:15:18','2020-12-21 15:09:44','0','0',NULL,NULL,NULL,0,NULL,'TW2762JMYJHBU55E','99d5e998-058e-4a76-9b99-5fd4d525630f','2999-12-31 23:59:59');
COMMIT;

-- ----------------------------
-- Table structure for t_sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_user_role`;
CREATE TABLE `t_sys_user_role` (
  `user_id` bigint(20) unsigned NOT NULL COMMENT '用户ID',
  `role_id` bigint(20) unsigned NOT NULL COMMENT '角色ID',
  `reversion`            bigint(20) unsigned default 0,
  `rsv1`                 varchar(128),
  PRIMARY KEY (`user_id`,`role_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='用户角色表';

-- ----------------------------
-- Records of t_sys_user_role
-- ----------------------------
BEGIN;
INSERT INTO `t_sys_user_role` VALUES (1, 1,0,null);
COMMIT;



-- ----------------------------
-- Table structure for gen_datasource_conf
-- ----------------------------
DROP TABLE IF EXISTS `gen_datasource_conf`;
CREATE TABLE `gen_datasource_conf` (
  `id` bigint(20) unsigned  NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `username` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新',
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `tenant_id` varchar(64) DEFAULT NULL COMMENT '租户ID',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='数据源表';


-- ----------------------------
-- Table structure for gen_form_conf
-- ----------------------------
DROP TABLE IF EXISTS `gen_form_conf`;
CREATE TABLE `gen_form_conf` (
  `id` bigint(20) unsigned  NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `table_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `form_info` json NOT NULL COMMENT '表单信息',
  `create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '0',
  `tenant_id` varchar(64) DEFAULT NULL COMMENT '所属租户',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_gen_form_table_name` (`table_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='表单配置';



SET FOREIGN_KEY_CHECKS = 1;